<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>仓库管理系统</title>
    <%@ include file="/common/meta.jsp"%>
	
	<%@ include file="/common/header.jsp"%>

    <!-- Demo page code -->

    <style type="text/css">
        #line-chart {
            height:300px;
            width:800px;
            margin: 0px auto;
            margin-top: 1em;
        }
        .brand { font-family: georgia, serif; }
        .brand .first {
            color: #ccc;
            font-style: italic;
        }
        .brand .second {
            color: #fff;
            font-weight: bold;
        }
    </style>

    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

  </head>

  <!--[if lt IE 7 ]> <body class="ie ie6"> <![endif]-->
  <!--[if IE 7 ]> <body class="ie ie7 "> <![endif]-->
  <!--[if IE 8 ]> <body class="ie ie8 "> <![endif]-->
  <!--[if IE 9 ]> <body class="ie ie9 "> <![endif]-->
  <!--[if (gt IE 9)|!(IE)]><!--> 
  <body class=""> 
  <!--<![endif]-->
    
    <div class="navbar">
        <div class="navbar-inner">
                <ul class="nav pull-right">
                </ul>
                <a class="brand" href="index.html"><span class="first">Your</span> <span class="second">Company</span></a>
        </div>
    </div>
    
	<div class="row-fluid">
	    <div class="dialog">
	        <div class="block">
	            <p class="block-heading">新用户注册</p>
	            <div class="block-body">
	            	 <form class="form-horizontal form-custom">
					  <div class="control-group">
					    <label class="control-label" for="inputEmail">登陆账号</label>
					    <div class="controls">
					      <input type="email" class="form-control" id="inputEmail" placeholder="Email">
					    </div>
					  </div>
					  <div class="control-group">
					    <label class="control-label" for="inputPassword">密码</label>
					    <div class="controls">
					      <input type="password" class="form-control" id="inputPassword" placeholder="请输入密码">
					    </div>
					  </div>
					  <div class="control-group">
					    <label class="control-label" for="inputNewPassword">确认密码</label>
					    <div class="controls">
					      <input type="password" class="form-control" id="inputNewPassword" placeholder="请确认输入密码">
					    </div>
					  </div>
					  <div class="control-group">
					    <label class="control-label" for="inputNameNick">昵称</label>
					    <div class="controls">
					      <input type="text	" class="form-control" id="inputNameNick" placeholder="请输入昵称">
					    </div>
					  </div>
					  <div class="control-group">
					    <label class="control-label" class="form-control" for="inputName">姓名</label>
					    <div class="controls">
					      <input type="text" class="form-control" id="inputName" placeholder="请输入姓名">
					    </div>
					  </div>
					  <div class="control-group">
					    <label class="control-label" for="inputVcode">验证码</label>
					    <div class="controls">
					      <input type="text" class="form-control" id="inputVcode" placeholder="请输入验证码">
					      <img src="./open/getGifCode" alt="验证码" />
					    </div>
					  </div>
					    <div class="controls">
					      <label class="checkbox">
					        <input type="checkbox"> Remember me
					      </label>
					      <button type="submit" class="btn">Sign in</button>
					    </div>
					  </div>
					</form>
	            
	            
	            
	            
	            
	            
	            
	            
	            
	                <!-- <form class="u-register" action="" method="post">
	                    <label>邮箱（登陆账号）</label>
	                    <input name="email" type="text" class="span12" />
	                    <label>昵称</label>
	                    <input name="nickName" type="text" class="span12" />
	                    <label>姓名</label>
	                    <input name="userName" type="text" class="span12" />
	                    <label>密码</label>
	                    <input name="pswd" type="password" class="span12" />
	                    <label>确认密码</label>
	                    <input name="newPswd" type="password" class="span12" />
	                    <label>验证码</label>
	                    <input name="vcode" type="text" class="span12" />
	                    <a href="#" class="btn btn-primary pull-right">提 交</a>
	                    <label class="remember-me"><input type="checkbox">同意  <a href="terms-and-conditions.html">仓库管理协议</a></label>
	                    <div class="clearfix"></div>
	                </form> -->
	            </div>
	        </div>
	        <p><a href="privacy-policy.html">隐私策略</a></p>
	    </div>
	</div>

    <script src="${ctx}/js/bootstrap/js/bootstrap.js"></script>
    <script type="text/javascript">
    	/**
    	*  $('#form').serialize();        //会根据input里面的name，把数据序列化成字符串；eg：name=yang
        *  $('#form').serializeArray();    //会根据input里面的name，把数据序列化成数组；eg：[object]
      　　	*  //注意：没有name会获取不到值
		*
        *  //下面两种不是jQuery的方法
        *  JSON.parse()        //json字符串转化为json对象
        *  JSON.stringify()    //json对象转化为json字符串
    	**/
    
    
        $("[rel=tooltip]").tooltip();
        $(function() {
            $('.demo-cancel-click').click(function(){return false;});
            
            $('.btn-primary').click(function(){
            	$.post("${ctx}/subRegister",$(".u-register").serialize() ,function(result){
		    		layer.close(load);
		    		if(result && result.status!= 200){
		    			return layer.msg(result.message,function(){}),!1;
		    		}else{
		    			layer.msg('注册成功！' );
		    			window.location.href= result.back_url || "${basePath}/";
		    		}
		    	},"json");
            	return false;
            });
        });
    </script>
    
  </body>
</html>


